home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / PInterfaces / OSAGeneric.p < prev    next >
Encoding:
Text File  |  1995-07-06  |  4.1 KB  |  136 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OSAGeneric.p
  3.  
  4.      Contains:    AppleScript Generic Component Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT OSAGeneric;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __OSAGENERIC__}
  30. {$SETC __OSAGENERIC__ := 1}
  31.  
  32. {$I+}
  33. {$SETC OSAGenericIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __ERRORS__}
  38. {$I Errors.p}
  39. {$ENDC}
  40. {    ConditionalMacros.p                                            }
  41.  
  42. {$IFC UNDEFINED __APPLEEVENTS__}
  43. {$I AppleEvents.p}
  44. {$ENDC}
  45. {    Types.p                                                        }
  46. {    Memory.p                                                    }
  47. {        MixedMode.p                                                }
  48. {    OSUtils.p                                                    }
  49. {    Events.p                                                    }
  50. {        Quickdraw.p                                                }
  51. {            QuickdrawText.p                                        }
  52. {    EPPC.p                                                        }
  53. {        AppleTalk.p                                                }
  54. {        Files.p                                                    }
  55. {            Finder.p                                            }
  56. {        PPCToolbox.p                                            }
  57. {        Processes.p                                                }
  58. {    Notification.p                                                }
  59.  
  60. {$IFC UNDEFINED __OSA__}
  61. {$I OSA.p}
  62. {$ENDC}
  63. {    AEObjects.p                                                    }
  64. {    Components.p                                                }
  65.  
  66. {$PUSH}
  67. {$ALIGN MAC68K}
  68. {$LibExport+}
  69. {     NOTE:    This interface defines a "generic scripting component."
  70.             The Generic Scripting Component allows automatic dispatch to a
  71.             specific scripting component that conforms to the OSA interface.
  72.             This component supports OSA, by calling AppleScript or some other 
  73.             scripting component.  Additionally it provides access to the default
  74.             and the user-prefered scripting component.
  75. }
  76.  
  77. CONST
  78. { Component version this header file describes }
  79.     kGenericComponentVersion    = $0100;
  80.  
  81.     kGSSSelectGetDefaultScriptingComponent = $1001;
  82.     kGSSSelectSetDefaultScriptingComponent = $1002;
  83.     kGSSSelectGetScriptingComponent = $1003;
  84.     kGSSSelectGetScriptingComponentFromStored = $1004;
  85.     kGSSSelectGenericToRealID    = $1005;
  86.     kGSSSelectRealToGenericID    = $1006;
  87.     kGSSSelectOutOfRange        = $1007;
  88.  
  89.     
  90. TYPE
  91.     ScriptingComponentSelector = OSType;
  92.  
  93.     GenericID = OSAID;
  94.  
  95. { get and set the default scripting component }
  96.  
  97. FUNCTION OSAGetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; VAR scriptingSubType: ScriptingComponentSelector): OSAError;
  98.     {$IFC NOT GENERATINGCFM}
  99.     INLINE $2F3C, 4, $1001, $7000, $A82A;
  100.     {$ENDC}
  101. FUNCTION OSASetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector): OSAError;
  102.     {$IFC NOT GENERATINGCFM}
  103.     INLINE $2F3C, 4, $1002, $7000, $A82A;
  104.     {$ENDC}
  105. { get a scripting component instance from its subtype code }
  106. FUNCTION OSAGetScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector; VAR scriptingInstance: ComponentInstance): OSAError;
  107.     {$IFC NOT GENERATINGCFM}
  108.     INLINE $2F3C, 8, $1003, $7000, $A82A;
  109.     {$ENDC}
  110. { get a scripting component selector (subType) from a stored script }
  111. FUNCTION OSAGetScriptingComponentFromStored(genericScriptingComponent: ComponentInstance; {CONST}VAR scriptData: AEDesc; VAR scriptingSubType: ScriptingComponentSelector): OSAError;
  112.     {$IFC NOT GENERATINGCFM}
  113.     INLINE $2F3C, 8, $1004, $7000, $A82A;
  114.     {$ENDC}
  115. { get a real component instance and script id from a generic id }
  116. FUNCTION OSAGenericToRealID(genericScriptingComponent: ComponentInstance; VAR theScriptID: OSAID; VAR theExactComponent: ComponentInstance): OSAError;
  117.     {$IFC NOT GENERATINGCFM}
  118.     INLINE $2F3C, 8, $1005, $7000, $A82A;
  119.     {$ENDC}
  120. { get a generic id from a real component instance and script id }
  121. FUNCTION OSARealToGenericID(genericScriptingComponent: ComponentInstance; VAR theScriptID: OSAID; theExactComponent: ComponentInstance): OSAError;
  122.     {$IFC NOT GENERATINGCFM}
  123.     INLINE $2F3C, 8, $1006, $7000, $A82A;
  124.     {$ENDC}
  125.  
  126. {$ALIGN RESET}
  127. {$POP}
  128.  
  129. {$SETC UsingIncludes := OSAGenericIncludes}
  130.  
  131. {$ENDC} {__OSAGENERIC__}
  132.  
  133. {$IFC NOT UsingIncludes}
  134.  END.
  135. {$ENDC}
  136.